var numpost = 7,
    cmtext = "Komentar",
    cmsumm = 100,
   pblank = "http://3.bp.blogspot.com/-o8PgBqd120U/UJSsVLA4udI/AAAAAAAAAgs/FJnTxQc8kuI/s0/no-image.png";

// Recent Post with Thumbnail by dte.web.id
function dropdownposts(json) {
    var entry = json.feed.entry, posturl, postimg;
    for (var i = 0; i < numpost; i++) {
        for (var j = 0; j < entry[i].link.length; j++) {
            if (entry[i].link[j].rel == 'alternate') {
                posturl = entry[i].link[j].href;
                break;
            }
        }
        for (var l = 0; l < entry[i].link.length; l++) {
            if (entry[i].link[l].rel == "replies" && entry[i].link[l].type == "text/html") {
                cmnum = entry[i].link[l].title.split(" ")[0];
                break;
            }
        }
        var poststitle = entry[i].title.$t,
            postdate = entry[i].published.$t.substring(0, 10);
        postdate = postdate.replace(/\-/g, "/");
        postimg = ("media$thumbnail" in entry[i]) ? entry[i].media$thumbnail.url : pblank;
        document.write('<li><img src="' + postimg + '" class="rp-thumb" alt="thumb" /><strong><a href="' + posturl + '">' + poststitle + '</a></strong><div class="footer-outer"><span class="dt">' + postdate + '</span><span class="cm"> - ' + cmnum + ' ' + cmtext + '</span></div></li>');
    }
}